package com.douqu.game.activity.entity.camp;

/**
 * 当天参与过阵营战的玩家,包含没有复活次数的
 * @Author: Bean
 * @Description:
 * @Date: 2018-08-25 11:42
 */
public class CampRecordPlayer {

    private String objectIndex;

    private int serverId;

    private int camp;


    public CampRecordPlayer() {
    }

    public CampRecordPlayer(String objectIndex) {
        this.objectIndex = objectIndex;
    }

    public CampRecordPlayer(CampPlayer campPlayer)
    {
        this.objectIndex = campPlayer.getPlayerBase().getObjectIndex();
        this.serverId = campPlayer.getPlayerBase().getServerId();
        this.camp = campPlayer.getPlayerBase().getCamp();
    }

    public String getObjectIndex() {
        return objectIndex;
    }

    public void setObjectIndex(String objectIndex) {
        this.objectIndex = objectIndex;
    }

    public int getServerId() {
        return serverId;
    }

    public void setServerId(int serverId) {
        this.serverId = serverId;
    }

    public int getCamp() {
        return camp;
    }

    public void setCamp(int camp) {
        this.camp = camp;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (!(o instanceof CampRecordPlayer)) return false;

        CampRecordPlayer that = (CampRecordPlayer) o;

        if (objectIndex != null ? !objectIndex.equals(that.objectIndex) : that.objectIndex != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        return objectIndex != null ? objectIndex.hashCode() : 0;
    }

    @Override
    public String toString() {
        return "{" +
                "objectIndex='" + objectIndex + '\'' +
                ", serverId=" + serverId +
                ", camp=" + camp +
                '}';
    }
}
